Skip to content

Commit

Permalink
add new logs for stream request manager
Browse files Browse the repository at this point in the history
  • Loading branch information
GheisMohammadi committed Apr 30, 2024
1 parent 156ea51 commit be600ee
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion p2p/stream/common/requestmanager/requestmanager.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,8 @@ func (rm *requestManager) loop() {
if req == nil {
break loop
}
rm.logger.Debug().Str("request", req.String()).
Msg("add new incoming request to pending queue")
rm.addPendingRequest(req, st)
b, err := req.Encode()
if err != nil {
Expand Down Expand Up @@ -202,7 +204,8 @@ func (rm *requestManager) loop() {
func (rm *requestManager) handleNewRequest(req *request) bool {
rm.lock.Lock()
defer rm.lock.Unlock()

rm.logger.Debug().Str("request", req.String()).
Msg("add new outgoing request to waiting queue")
err := rm.addRequestToWaitings(req, reqPriorityLow)
if err != nil {
rm.logger.Warn().Err(err).Msg("failed to add new request to waitings")
Expand Down

0 comments on commit be600ee

Please sign in to comment.