processPendingPushNotificationWithReader processes all pending push notifications on a connection This method should be called by the client in WithReader before reading the reply
(ctx context.Context, cn *pool.Conn, rd *proto.Reader)
| 1761 | // processPendingPushNotificationWithReader processes all pending push notifications on a connection |
| 1762 | // This method should be called by the client in WithReader before reading the reply |
| 1763 | func (c *baseClient) processPendingPushNotificationWithReader(ctx context.Context, cn *pool.Conn, rd *proto.Reader) error { |
| 1764 | // if we have the reader, we don't need to check for data on the socket, we are waiting |
| 1765 | // for either a reply or a push notification, so we can block until we get a reply or reach the timeout |
| 1766 | if c.opt.Protocol != 3 || c.pushProcessor == nil { |
| 1767 | return nil |
| 1768 | } |
| 1769 | |
| 1770 | // Create handler context with client, connection pool, and connection information |
| 1771 | handlerCtx := c.pushNotificationHandlerContext(cn) |
| 1772 | return c.pushProcessor.ProcessPendingNotifications(ctx, handlerCtx, rd) |
| 1773 | } |
| 1774 | |
| 1775 | // pushNotificationHandlerContext creates a handler context for push notification processing |
| 1776 | func (c *baseClient) pushNotificationHandlerContext(cn *pool.Conn) push.NotificationHandlerContext { |
no test coverage detected