Skip to content

Commit 5ed0803

Browse files
committed
Fix reflector lines
1 parent 25e237a commit 5ed0803

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

reflector/server.go

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@ func handleConnection(conn net.Conn) {
7474
blobData := make([]byte, blobSize)
7575
_, err := io.ReadFull(conn, blobData)
7676

77-
//TODO Process blob data
78-
fmt.Printf("BLOB = %+v\n", blobData)
77+
// TODO Process blob data
78+
fmt.Printf("BLOB [%d] (%s) = %+v\n", blobSize, blobHash, blobData)
7979

8080
jsonEncoder.Encode(map[string]any{
8181
"received_blob": err == nil,
@@ -85,15 +85,13 @@ func handleConnection(conn net.Conn) {
8585
return
8686
}
8787
continue
88-
8988
}
9089

9190
if version >= 1 && hasSDBlobHash && hasSDBlobSize {
9291
sdBlobHash := sdBlobHashValue.(string)
9392
sdBlobSize := int(sdBlobSizeValue.(float64))
9493

9594
if len(sdBlobHash) != 96 || sdBlobSize <= 0 || sdBlobSize > 2097152 {
96-
9795
conn.Close()
9896
return
9997
}
@@ -105,8 +103,8 @@ func handleConnection(conn net.Conn) {
105103
sdBlobData := make([]byte, sdBlobSize)
106104
_, err := io.ReadFull(conn, sdBlobData)
107105

108-
//TODO Process SD blob data
109-
fmt.Printf("SD BLOB = %+v\n", string(sdBlobData))
106+
// TODO Process SD blob data
107+
fmt.Printf("SD BLOB [%d] (%s) = %+v\n", sdBlobSize, sdBlobHash, string(sdBlobData))
110108

111109
jsonEncoder.Encode(map[string]any{
112110
"received_sd_blob": err == nil,

0 commit comments

Comments
 (0)