aboutsummaryrefslogtreecommitdiff
path: root/stream_handler.go
diff options
context:
space:
mode:
Diffstat (limited to 'stream_handler.go')
-rw-r--r--stream_handler.go6
1 files changed, 2 insertions, 4 deletions
diff --git a/stream_handler.go b/stream_handler.go
index a436fd5..97975fa 100644
--- a/stream_handler.go
+++ b/stream_handler.go
@@ -149,7 +149,7 @@ func (sh *StreamHandler) storageCurrentDocument() {
payload := sh.streamFlow.Hash()&uint64(0xffffffffffffff00) | uint64(len(sh.documentsIDs)) // LOL
streamID := CustomRowID(payload, sh.firstPacketSeen)
- _, err := sh.connection.Storage().Insert(ConnectionStreams).
+ if _, err := sh.connection.Storage().Insert(ConnectionStreams).
One(ConnectionStream{
ID: streamID,
ConnectionID: ZeroRowID,
@@ -159,9 +159,7 @@ func (sh *StreamHandler) storageCurrentDocument() {
BlocksTimestamps: sh.timestamps,
BlocksLoss: sh.lossBlocks,
PatternMatches: sh.patternMatches,
- })
-
- if err != nil {
+ }); err != nil {
log.WithError(err).Error("failed to insert connection stream")
} else {
sh.documentsIDs = append(sh.documentsIDs, streamID)