Skip to content

Commit 748cb33

Browse files
committed
Remove unused fn
🤦
1 parent 57f464a commit 748cb33

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

agent/reconnectingpty/buffered.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ func (rpty *bufferedReconnectingPTY) lifecycle(ctx context.Context, logger slog.
132132
logger.Debug(ctx, "reconnecting pty ready")
133133
rpty.state.setState(StateReady, nil)
134134

135-
state, reasonErr := rpty.state.waitForStateOrContext(ctx, StateClosing, nil)
135+
state, reasonErr := rpty.state.waitForStateOrContext(ctx, StateClosing)
136136
if state < StateClosing {
137137
// If we have not closed yet then the context is what unblocked us (which
138138
// means the agent is shutting down) so move into the closing phase.

agent/reconnectingpty/reconnectingpty.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ func (s *ptyState) waitForState(state State) (State, error) {
168168

169169
// waitForStateOrContext blocks until the state or a greater one is reached or
170170
// the provided context ends.
171-
func (s *ptyState) waitForStateOrContext(ctx context.Context, state State, fn func(state State) error) (State, error) {
171+
func (s *ptyState) waitForStateOrContext(ctx context.Context, state State) (State, error) {
172172
s.cond.L.Lock()
173173
defer s.cond.L.Unlock()
174174
return s.waitForStateOrContextLocked(ctx, state)

agent/reconnectingpty/screen.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ func (rpty *screenReconnectingPTY) lifecycle(ctx context.Context, logger slog.Lo
130130
logger.Debug(ctx, "reconnecting pty ready")
131131
rpty.state.setState(StateReady, nil)
132132

133-
state, reasonErr := rpty.state.waitForStateOrContext(ctx, StateClosing, nil)
133+
state, reasonErr := rpty.state.waitForStateOrContext(ctx, StateClosing)
134134
if state < StateClosing {
135135
// If we have not closed yet then the context is what unblocked us (which
136136
// means the agent is shutting down) so move into the closing phase.

0 commit comments

Comments
 (0)